package com.sayice.gomoku.service.impl;

import com.sayice.gomoku.dao.AdminDao;
import com.sayice.gomoku.dao.impl.AdminDaoImpl;
import com.sayice.gomoku.pojo.Admin;
import com.sayice.gomoku.service.AdminService;

/**
 * 管理员业务
 */
public class AdminServiceImpl implements AdminService {
    private final AdminDao adminDao = new AdminDaoImpl();
    
    @Override
    public Admin login(Admin admin) {
        return adminDao.queryByNameAndPassword(admin.getName(), admin.getPassword());
    }
    
    @Override
    public Admin getAdminById(int id) {
        return adminDao.queryById(id);
    }
}
